package com.mammoth.Bodybuilding.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 
 * @title : PictureObj
 * @description : 图片表
 * @company : com.mammoth.Bodybuilding.entity
 * @project Mammoth
 * @author xingzhaojun
 * @date 2018年4月24日 下午11:01:50
 */
@Entity
@Table(name = "PICTURE")
public class PictureObj implements Serializable {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 291156565775490217L;
	/** 主键id **/
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	/** 图片路径 **/
	private String picturePath;
	/** 图片备注 **/
	private String context;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPicturePath() {
		return picturePath;
	}

	public void setPicturePath(String picturePath) {
		this.picturePath = picturePath;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((context == null) ? 0 : context.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((picturePath == null) ? 0 : picturePath.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PictureObj other = (PictureObj) obj;
		if (context == null) {
			if (other.context != null)
				return false;
		} else if (!context.equals(other.context))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (picturePath == null) {
			if (other.picturePath != null)
				return false;
		} else if (!picturePath.equals(other.picturePath))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "PictureObj [id=" + id + ", picturePath=" + picturePath + ", context=" + context + "]";
	}

}
